<template>
    <div class="setcommidy">
        <div class="already-search">
            <ul>
                <li>
                    <Select v-model="model1" style="width:200px">
                        <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
                    </Select>
                </li>
                <li>
                    <Select v-model="model1" style="width:200px">
                        <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
                    </Select>
                </li>
                <li>
                    <span>商品名称</span>
                     <Input v-model="value" placeholder="请输入商品名称" style="width: 300px"/>
                </li>
                <li>
                    <span>商品编码</span>
                    <Input v-model="value" placeholder="请输入商品编码" style="width: 300px"/>
                </li>
                <li>
                    <span>SKU编码</span>
                    <Input v-model="value" placeholder="请输入SKU编码" style="width: 300px"/>
                </li>
                <li>
                    <Button type="primary">搜索</Button>
                </li>
            </ul>
        </div>
        <div class="main-commidy">
            <Table  ref="selection" stripe :columns="columns1" :data="data1"></Table>
            <div class="for-button">
                <Button type="primary">设置商品</Button>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    name: 'setcommidy',
    data () {
        return {
          columns1: [
                {
                    type: 'selection',
                    width: 60,
                    align: 'left'
                },
                {
                    title: '商品编码',
                    key: 'index'
                },
                {
                    title: 'SKU编码',
                    key: 'age'
                },
                {
                    title: '图片',
                    key: 'number',
                    render: (h,params) => {
                        return h('img',{
                            attrs: {
                                src: params.row.number
                            },
                            style: {
                                width: '30px',
                            }
                        })
                    }
                },
                {
                    title: '商品名称',
                    key: 'address'
                },
                {
                    title: '状态',
                    key: 'returnGoods'
                },
                {
                    title: '零售价',
                    key: 'name'
                },
                {
                    title: '库存',
                    key: 'price'
                }
            ],
            data1: [
                {
                    name: 'John Brown',
                    age: 18,
                    address: 'New York No. 1 Lake Park',
                    date: '2016-10-03',
                    index: 0,
                    price: 2,
                    number: "",
                    xiaoji: 4,
                    returnGoods: 5
                },
                {
                    name: 'Jim Green',
                    age: 24,
                    address: 'London No. 1 Lake Park',
                    date: '2016-10-01',
                    index: 0,
                    price: 2,
                    number: "",
                    xiaoji: 4,
                    returnGoods: 5
                },
                {
                    name: 'Joe Black',
                    age: 30,
                    address: 'Sydney No. 1 Lake Park',
                    date: '2016-10-02',
                    index: 0,
                    price: 2,
                    number: "",
                    xiaoji: 4,
                    returnGoods: 5
                },
                {
                    name: 'Jon Snow',
                    age: 26,
                    address: 'Ottawa No. 2 Lake Park',
                    date: '2016-10-04',
                    index: 0,
                    price: 2,
                    number: "",
                    xiaoji: 4,
                    returnGoods: 5
                },
                {
                    name: 'Jon Snow',
                    age: 26,
                    address: 'Ottawa No. 2 Lake Park',
                    date: '2016-10-04',
                    index: 0,
                    price: 2,
                    number: "",
                    xiaoji: 4,
                    returnGoods: 5
                },
                {
                    name: 'Jon Snow',
                    age: 26,
                    address: 'Ottawa No. 2 Lake Park',
                    date: '2016-10-04',
                    index: 0,
                    price: 2,
                    number: "",
                    xiaoji: 4,
                    returnGoods: 5
                }
            ]
        }
    },
    mounted () {
        // alert(0)
    }
}
</script>

